package AbstractFactoryDemo.example.listfactory;

import AbstractFactoryDemo.example.factory.Factory;
import AbstractFactoryDemo.example.factory.Link;
import AbstractFactoryDemo.example.factory.Page;
import AbstractFactoryDemo.example.factory.Tray;

/**
 * @author zsh
 * @Description
 * @create 2022-07-03 20:01
 */
public class ListFactory extends Factory {
    @Override
    public Link createLink(String caption, String url) {
        return new ListLink(caption,url);
    }

    @Override
    public Tray createTray(String caption) {
        return new ListTray(caption);
    }

    @Override
    public Page createPage(String title, String author) {
        return new ListPage(title,author);
    }
}
